const state = () => ({
  tableFormItemList: [], // 编辑状态下表格表单组件的组件实例集合
})

const getters = {
  getTableFormItemList(state) {
    return state.tableFormItemList
  },
}

const mutations = {
  // 设置组件实例
  setTableFormItemList(state, val) {
    state.tableFormItemList.push(val)
  },
  // 清空组件实例
  clearTableFormItemList(state) {
    state.tableFormItemList = []
  },
}

const actions = {
  // 设置组件实例
  setTableFormItemList({ commit }, val) {
    commit('setTableFormItemList', val)
  },
  clearTableFormItemList({ commit }) {
    commit('clearTableFormItemList')
  },
}

export default {
  state,
  getters,
  mutations,
  actions,
}
